/**
 * 图表相关常量配置
 */

// 股票图表基础配置
export const STOCK_CHART_OPTIONS = {
  tooltip: {
    trigger: 'axis',
    formatter: '{b}: {c}'
  },
  grid: {
    left: '3%',
    right: '4%',
    bottom: '3%',
    containLabel: true
  },
  xAxis: {
    type: 'category',
    boundaryGap: false,
    axisLine: {
      lineStyle: {
        color: '#999'
      }
    }
  },
  yAxis: {
    type: 'value',
    axisLine: {
      lineStyle: {
        color: '#999'
      }
    },
    splitLine: {
      lineStyle: {
        color: '#eee'
      }
    }
  }
};

// 图表主题色
export const CHART_COLORS = {
  primary: '#409EFF',
  success: '#67C23A',
  warning: '#E6A23C',
  danger: '#F56C6C',
  info: '#909399'
};

// 图表标记点样式
export const MARK_POINT_STYLE = {
  symbol: 'circle',
  symbolSize: 8,
  itemStyle: {
    color: CHART_COLORS.primary
  }
};

// 图表标记线样式
export const MARK_LINE_STYLE = {
  lineStyle: {
    color: CHART_COLORS.warning,
    type: 'dashed'
  },
  label: {
    formatter: '{b}: {c}'
  }
};

// 图表区域样式
export const AREA_STYLE = {
  opacity: 0.1
};

// 图表图例样式
export const LEGEND_STYLE = {
  top: 10,
  right: 10,
  textStyle: {
    color: '#666'
  }
}; 